Skip to content

[JSC] Work around GCC miscompilation in testmasm#1621

Merged
magomez merged 1 commit intoWebPlatformForEmbedded:wpe-2.46from
aoikonomopoulos:2.46-gcc-miscompilation-workaround
Feb 18, 2026
Merged

[JSC] Work around GCC miscompilation in testmasm#1621
magomez merged 1 commit intoWebPlatformForEmbedded:wpe-2.46from
aoikonomopoulos:2.46-gcc-miscompilation-workaround

Conversation

@aoikonomopoulos
Copy link
Copy Markdown

https://bugs.webkit.org/show_bug.cgi?id=307056

Reviewed by Justin Michaud.

It seems that GCC miscompiles the switch statement in testMoveConditionallyFloatingPointSameArg when -funswitch-loops is on (that's the case for -O3). The symptom is that we don't handle MacroAssembler::DoubleEqualAndOrdered (at least) and end up hitting the following RELEASE_ASSERT_NOT_REACHED();.

Globally turn off this specific transformation when compiling with older versions of GCC, to avoid running into further hard-to-diagnose bugs.

Canonical link: https://commits.webkit.org/307067@main

Pull Request Template

File a Bug

All changes should be associated with a bug. The WebKit project is currently using Bugzilla as our bug tracker. Note that multiple changes may be associated with a single bug.

Provided Tooling

The WebKit Project strongly recommends contributors use Tools/Scripts/git-webkit to generate pull requests. See Setup and Contributing Code for how to do this.

Template

If a contributor wishes to file a pull request manually, the template is below. Manually-filed pull requests should contain their commit message as the pull request description, and their commit message should be formatted like the template below.

Additionally, the pull request should be mentioned on Bugzilla, labels applied to the pull request matching the component and version of the Bugzilla associated with the pull request and the pull request assigned to its author.

< bug title >
https://bugs.webkit.org/show_bug.cgi?id=#####

Reviewed by NOBODY (OOPS!).

Explanation of why this fixes the bug (OOPS!).

* path/changed.ext:
(function):
(class.function):

https://bugs.webkit.org/show_bug.cgi?id=307056

Reviewed by Justin Michaud.

It seems that GCC miscompiles the switch statement in
testMoveConditionallyFloatingPointSameArg when -funswitch-loops is on
(that's the case for -O3). The symptom is that we don't handle
MacroAssembler::DoubleEqualAndOrdered (at least) and end up hitting the
following RELEASE_ASSERT_NOT_REACHED();.

Globally turn off this specific transformation when compiling with older
versions of GCC, to avoid running into further hard-to-diagnose bugs.

Canonical link: https://commits.webkit.org/307067@main
@magomez magomez merged commit 99499dc into WebPlatformForEmbedded:wpe-2.46 Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants